home *** CD-ROM | disk | FTP | other *** search
/ CD BIT 75 / CD BIT 75.iso / Software / ooo / f_0020 / sbasic.jar / text / sbasic / common / 03030102.xml < prev    next >
Encoding:
Extensible Markup Language  |  2003-08-01  |  3.9 KB  |  31 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <html><head><title>DateValue Function [Runtime]</title><meta name="filename" content="text/sbasic/common/03030102"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
  3.  
  4.         p.P1{
  5.                 }
  6.         span.T1{
  7.                 font-weight:bold;}
  8.         </style></head><body>
  9.   
  10.   
  11.   <help:paragraphinfo state="E" xmlns:help="http://openoffice.org/2000/help"/><help:to-be-embedded Eid="datevalue" xmlns:help="http://openoffice.org/2000/help"><a name="datevalue"/>
  12.   <p class="Head1"><help:paragraphinfo state="U" number="1"/><help:key-word value="DateValue; function" tag="kw66574_1"/><help:link Id="66574">DateValue Function [Runtime]</help:link></p>
  13.   <p class="Paragraph"><help:paragraphinfo state="U" number="2"/>Returns a number from a date string. The date string is a complete date in a single numeric value. You can also use this serial number to determine the difference between two dates.</p>
  14.   <help:paragraphinfo state="E"/></help:to-be-embedded>
  15.   <p class="Head2"><help:paragraphinfo state="U" number="3" xmlns:help="http://openoffice.org/2000/help"/>Syntax:</p>
  16.   <p class="Paragraph"><help:paragraphinfo state="U" number="4" xmlns:help="http://openoffice.org/2000/help"/>DateValue [(date)]</p>
  17.   <p class="Head2"><help:paragraphinfo state="U" number="5" xmlns:help="http://openoffice.org/2000/help"/>Return value:</p>
  18.   <p class="Paragraph"><help:paragraphinfo state="U" number="6" xmlns:help="http://openoffice.org/2000/help"/>Long</p>
  19.   <p class="Head2"><help:paragraphinfo state="U" number="7" xmlns:help="http://openoffice.org/2000/help"/>Parameters:</p>
  20.   <p class="Paragraph"><help:paragraphinfo state="U" number="8" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Date:</span> String expression that contains the date that you want to calculate. The date can be specified in almost any format.</p>
  21.   <p class="Paragraph"><help:paragraphinfo state="U" number="22" xmlns:help="http://openoffice.org/2000/help"/>You can use this function to convert a date that occurs between December 1, 1582 and December 31, 9999 into a single integer value. You can then use this value to calculate the difference between two dates. If the date argument lies outside the acceptable range, <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Basic returns an error message.</p>
  22.   <p class="Paragraph"><help:paragraphinfo state="U" number="23" xmlns:help="http://openoffice.org/2000/help"/>In contrast to the DateSerial function that passes years, months, and days as separate numeric values, the DateValue function passes the date using the format "month.[,]day.[,]year".</p>
  23.   <help:paragraphinfo state="E" xmlns:help="http://openoffice.org/2000/help"/><help:embedded Id="66475" Eid="languageformat" xmlns:help="http://openoffice.org/2000/help"/>
  24.   <p class="Paragraph"><help:paragraphinfo state="S" xmlns:help="http://openoffice.org/2000/help"/><help:embedded Id="66475" Eid="errorcode" xmlns:help="http://openoffice.org/2000/help"/></p>
  25.   <p class="Paragraph"><help:paragraphinfo state="S" xmlns:help="http://openoffice.org/2000/help"/><help:embedded Id="66475" Eid="err5" xmlns:help="http://openoffice.org/2000/help"/></p>
  26.   <p class="Head2"><help:paragraphinfo state="U" number="24" xmlns:help="http://openoffice.org/2000/help"/>Example:</p>
  27.   <p class="PropText"><help:paragraphinfo state="U" number="25" xmlns:help="http://openoffice.org/2000/help"/>Sub ExampleDateValue</p>
  28.   <p class="PropText"><help:paragraphinfo state="U" number="26" xmlns:help="http://openoffice.org/2000/help"/>msgbox DateValue("12/02/1997")</p>
  29.   <p class="PropText"><help:paragraphinfo state="U" number="27" xmlns:help="http://openoffice.org/2000/help"/>end sub</p>
  30.   <p class="PropText"><help:paragraphinfo state="U" number="28" xmlns:help="http://openoffice.org/2000/help"/></p>
  31.  </body></html>